package java_DesignPattern.BehavioralPattern.MediatorPattern;

/**
 * 房屋所有者类，继承自Person类
 */
public class HouseOwner extends Person {

    public HouseOwner(String name, Mediator mediator) {
        super(name, mediator);
    }

    // 房屋所有者联系中介者
    @Override
    public void contact(String message) {
        mediator.contact(message, this);
    }

     public void getMessage(String message) {
        System.out.println("房屋所有者" + getName() + "收到的信息是" + message);
    }
}
